#ifndef DATA_BRICK_CLIENT_H
#define DATA_BRICK_CLIENT_H

#include "ProtoInc.h"

struct DataBase
{
	unsigned uid;
	unsigned score;
	unsigned hit;
	unsigned level;

	char openid[32];
	char name[32];

	DataBase():
		uid(0),
		score(0),
		hit(0),
		level(0)
	{
		memset(openid, 0 , sizeof(openid));
		memset(name, 0 , sizeof(name));
	}

	void SetMessage(Base::BaseStaticCPP * msg)
	{
		msg->set_uid(uid);
		msg->set_name(name);
	}

	void SetMessage(Base::BaseFlexCPP *msg)
	{
		msg->set_level(level);
		msg->set_score(score);
		msg->set_hit(hit);
	}
};

#endif //DATA_BRICK_CLIENT_H
